<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 输出100-200之间所有的质数 -->
    <script>
        var num=parseInt(prompt("请输入一个整数"))
        var test=true
        for(var i=2; i<num ; i++){
            if(num%i==0){
               test=false;
            }   
        }
        if(test){
            alert("该整数是质数")
        }else{
            alert("该整数不是质数") 
        }
    </script>
</body>
</html>